package com.example.mode.repository.data_source;

import androidx.lifecycle.MutableLiveData;

import com.example.mode.entity.DEntity;

import java.util.List;

import io.reactivex.Observable;
import rxhttp.wrapper.param.RxHttp;

public class DSource {
    //remote data resource
    private static DSource sDSource;

    public static DSource getInstance() {
        if (null == sDSource) sDSource = new DSource();
        return sDSource;
    }

    /*福利图*/
    public Observable<MutableLiveData<List<DEntity>>> getLiveData() {
        return RxHttp.get("/api/data/福利/100/1")
                //.addAll(jsonObject.toString())
                .setDomainToGankIfAbsent()
                .asGankResponseList(DEntity.class);
    }
}
